package com.myplans.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.myplans.shared.Plan;

public class AddPlanEvent extends GwtEvent<AddPlanEventHandler> {
	private Plan plan;
	public static Type<AddPlanEventHandler> TYPE = new Type<AddPlanEventHandler>();

	public AddPlanEvent(Plan plan) {
		this.plan = plan;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<AddPlanEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(AddPlanEventHandler handler) {
		handler.onAddPlan(this);
	}

	public Plan getPlan() {
		return plan;
	}

}
